{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import dagstermill"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "tags": [
     "parameters"
    ]
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2020-03-06 15:05:29 - dagster - DEBUG - ephemeral_dagstermill_pipeline - 097f8492-c610-4df7-9461-03e0fb217378 - ENGINE_EVENT - Starting initialization of resources [list].\n",
      " event_specific_data = {\"error\": null, \"marker_end\": null, \"marker_start\": \"resources\", \"metadata_entries\": []}\n",
      "            step_key = \"this_solid.compute\"\n",
      "2020-03-06 15:05:29 - dagster - DEBUG - ephemeral_dagstermill_pipeline - 097f8492-c610-4df7-9461-03e0fb217378 - ENGINE_EVENT - Finished initialization of resources [list].\n",
      " event_specific_data = {\"error\": null, \"marker_end\": \"resources\", \"marker_start\": null, \"metadata_entries\": [[\"list\", \"Initialized in 0.01ms\", [\"builtins\", \"list\"]]]}\n",
      "            step_key = \"this_solid.compute\"\n"
     ]
    }
   ],
   "source": [
    "from dagster import ModeDefinition, ResourceDefinition\n",
    "\n",
    "context = dagstermill.get_context(mode_def=ModeDefinition(resource_defs={'list': ResourceDefinition(lambda _: [])}))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2020-03-06 15:05:43 - dagster - INFO - system - 097f8492-c610-4df7-9461-03e0fb217378 - Test logging information\n"
     ]
    }
   ],
   "source": [
    "context.log.info(\"Test logging information\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "context.resources.list.append('Hello, notebook!')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['Hello, notebook!']"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "context.resources.list"
   ]
  }
 ],
 "metadata": {
  "celltoolbar": "Tags",
  "kernelspec": {
   "display_name": "dagster",
   "language": "python",
   "name": "dagster"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
